package com.qianf.qfoffice.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Staff implements Serializable {

    private int id;

    private String uno;

    private String did;

    private String name;

    private String sex;

    private String email;

    private String qq;

    private String phone;

    private String heading;

    private String dname;

    /*
     * @JsonFormat(pattern = "yyyy--MM-dd HH:mm:ss",timezone = "GMT+8")
     * 将json中的将 转换为 java date
     * 返回json数据可以将date转为yyyy--MM-dd HH:mm:ss
     * */
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8",locale="zh")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date entryTime;

    private String flag;

    public Staff () {

    }

//    public Staff(int id, String uno, String did, String name,
//                 String sex, String email, String qq,
//                 String phone, String heading, String dname,
//                 Date entrytime, String flag) {
//        this.id = id;
//        this.uno = uno;
//        this.did = did;
//        this.name = name;
//        this.sex = sex;
//        this.email = email;
//        this.qq = qq;
//        this.phone = phone;
//        this.heading = heading;
//        this.dname = dname;
//        this.entrytime = entrytime;
//        this.flag = flag;
//    }

    public Staff(String uno, String did, String name, String sex, String email, String qq, String phone, Date entryTime) {
        this.uno = uno;
        this.did = did;
        this.name = name;
        this.sex = sex;
        this.email = email;
        this.qq = qq;
        this.phone = phone;
        this.entryTime = entryTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUno() {
        return uno;
    }

    public void setUno(String uno) {
        this.uno = uno;
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getHeading() {
        return heading;
    }

    public void setHeading(String heading) {
        this.heading = heading;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public Date getEntryTime() {
        return entryTime;
    }

    public void setEntryTime(Date entryTime) {
        this.entryTime = entryTime;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "Staff{" +
                "id=" + id +
                ", uno='" + uno + '\'' +
                ", did='" + did + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", email='" + email + '\'' +
                ", qq='" + qq + '\'' +
                ", phone='" + phone + '\'' +
                ", heading='" + heading + '\'' +
                ", dname='" + dname + '\'' +
                ", entryTime='" + entryTime + '\'' +
                ", flag='" + flag + '\'' +
                '}';
    }
}
